<%= javascript_include_tag "editorToolbar" %>

<div class="form-group">
<% if @node %>
  <input tabindex="1" name="title" type="text" class="col-lg-9 form-control" id="title" value="<%= @node.title %>">
<% else %>
  <input tabindex="1" name="title" type="text" class="col-lg-9 form-control" id="title" value="<%= params[:id] %>" placeholder="Title">
<% end %>
</div>

<br style="clear:both;padding-bottom:10px;" />

<script>
  (function(){
    $D = {
      uid: <%= current_user.uid %>,
      type: 'feature'
    }
  })()
</script>
<div id="legacy-editor-container">
  <%= render :partial => 'editor/editor' %>
</div>
<div>
  <input type="submit" id="publish" tabindex="5" class="publish btn btn-primary btn-lg" value="Save" />
  <a tabindex="6" id="toggle-preview-button-main" data-previewing-text="<%= t('wiki.edit.previewing_text') %>" class="btn btn-outline-secondary btn-lg preview-btn" onClick="$E.toggle_preview()"><%= t('wiki.edit.preview') %></a>
</div>
